<template>
    <div class="app-container h-auto min-h-full">
        <vxe-tip status="primary">
            <p>点击按钮查看控制台打印</p>
        </vxe-tip>
        <y-form :options="formOptions">
        </y-form>

    </div>
</template>

<script>
export default {
    data() {
        return {
            formOptions: {
                titleWidth: 120,
                data: {
                    name: 'test1',
                },
                items: [
                    { field: 'name', title: '名称', span: 24, required: true, itemRender: { name: 'VxeInput' } },
                    {
                        align: 'center', span: 24, itemRender: {
                            name: 'VxeButtonGroup',
                            options: [
                                { name: 'back', content: '返回' },
                                { name: 'cancel', content: '取消' },
                                { name: 'reset', content: '重置', type: 'reset' },
                                { name: 'save', content: '保存', type: 'submit', status: 'primary', icon: 'vxe-icon-save' }
                            ],
                            events: {
                                click(slotParams, { name }) {
                                    console.log(name, slotParams)
                                }
                            }
                        }
                    }
                ]
            }
        }
    }
}
</script>